#ifndef _SDL_TIMER_H_
#define _SDL_TIMER_H_

#include <SDL/SDL.h>

namespace sdl {

class Timer {
public:
	Timer();
	virtual ~Timer();

	void start(Uint32 interval);
	void stop();

protected:
	virtual Uint32 onTimer(Uint32 interval) = 0;

private:
	Timer(const Timer&);
	Timer& operator=(const Timer&);

	static Uint32 callback(Uint32 interval, void* p);

	SDL_TimerID _id;

};

} // namespace sdl

#endif // _SDL_TIMER_H_

